<template>
  <el-tree-select
      v-bind="vBind"
      v-model="defaultProps.row[item.prop]"
      :data="options"
      ref="component"
      @change="rowUpdateEmitEvent($event,'change')"
      :placeholder="placeholder"
  >
  </el-tree-select>
</template>

<script lang="ts">
import {ComsCommonMixin} from "../mixins/ComsCommonMixin";

export default {
  name: 'TreeSelect',
  mixins:[ComsCommonMixin],
  computed:{
    placeholder(){
      return this.item.props?.placeholder || '请选择'+(this.item.label || '')
    }
  },
  methods: {
    initValue() {
      if(this.item.props?.multiple){
        this.defaultProps.row[this.item.prop] = []
      } else {
        this.defaultProps.row[this.item.prop] = ''
      }
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
